/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
 * Description: 梯度调优模式集合通信算子插件头文件
 * Author: lilianlin
 * Create: 2020-09-08
 */

#ifndef AUTO_TUNING__PLUGIN_H
#define AUTO_TUNING__PLUGIN_H

#include "auto_tuning_hcom_ops_kernel_info_store.h"
#include "auto_tuning_hcom_graph_optimizer.h"

using AutoTuningHcomOpsKernelInfoStorePtr = std::shared_ptr<hccl::AutoTuningHcomOpsKernelInfoStore>;
using AutoTuningHcomGraphOptimizerPtr = std::shared_ptr<hccl::AutoTuningHcomGraphOptimizer>;

namespace hccl {
class AutoTuningPlugin {
public:
    static AutoTuningPlugin &Instance();
    ge::Status Initialize(const std::map<string, string> &options);
    ge::Status Finalize();
    void GetOpsKernelInfoStores(map<string, OpsKernelInfoStorePtr> &opKernInfos);
    void GetGraphOptimizerObjs(map<string, GraphOptimizerPtr> &graphOptimizers);
private:
    AutoTuningPlugin();
    ~AutoTuningPlugin();
    AutoTuningHcomOpsKernelInfoStorePtr opsKernelInfoStorePtr_;
    AutoTuningHcomGraphOptimizerPtr graphOptimizerPtr_;
};
}

#endif